# 定义发送短信的任务
from ronglian_sms_sdk import SmsSDK
from django.conf import settings
from celery_tasks.main import app
# 异步任务别名
@app.task(name='sms_send')
def sms_send(mobile, sms_data):
    sdk = SmsSDK(settings.ACCID, settings.ACCTOKEN, settings.APPID)
    sdk.sendMessage('1', mobile, sms_data)
